<?php
/**
 * 生产者
 */

use Php\Queue\Query;
use Php\Queue\RedisConfig;
use test\Test;

include '../vendor/autoload.php';


$config = (new RedisConfig)->setHost('192.168.174.131')->setPort('6379')->setAuth('123456')->setSelect(0)->setMaxResources(200);
$Query = new Query($config);

for ($i = 0; $i < 5000; $i++) {
	echo $Query->push(Test::class, ['time' => time(), 'name' => 'chenhuan', 'num' => $i]), PHP_EOL;
}

